#!/usr/bin/env python3
import csv
from collections import Counter
import pandas as pd
import xlrd
books = xlrd.open_workbook('21条微博.xlsx').sheet_names()
for sheet in books:

    print('{}正在读取'.format(sheet))
    data_frame=pd.read_excel('21条微博.xlsx',sheet_name='{}'.format(sheet))
    all_data_text = data_frame[:].values.T.tolist()[8]
    pure_text = [text_[:10] for text_ in all_data_text]
    date= Counter(pure_text)
    print(date)

# all_count_data = []
# name_list = []
# count_num = []
# words_file = csv.reader(open('words_new.csv','r',encoding='utf8'))
# for word,sheet in zip(words_file,books):
#     word_list = word[1:][0]
#     data_frame=pd.read_excel('21条微博.xlsx',sheet_name='{}'.format(sheet))
#     all_data_text = data_frame[:].values.T.tolist()[10]
#     pure_text = ''.join('%s' % text_ for text_ in all_data_text)
#     for item in word_list.split('、'):
#         all_count_data.append(pure_text.count(item))
#         # print(word[0:1],pure_text.count(item))
#     name_list.append(word[0:1][0])
#     count_num.append(sum(all_count_data))
#     del all_count_data[:]
#
# print(name_list,count_num)



